"""
@Time : 2021/9/13 10:25 
@Author : 常雷
@File : t_3数值交换.py 
@Software: PyCharm
"""
# 用一行代码实现数值交换
a = 13
b = 30
# 原型:
c = a
a = b
b = c
print(a, b)

# 一行代码实现:
a, b = b, a
print(a, b)

# 原理:
c = b, a
print(c)    # (30, 13)  自动包装成元组
a, b = (30, 13)
print(a, b) # 30 13 自动解包赋值(个数要对应)

'''
a, b = b, a
元组1 = b, a
a, b = 元组
'''